﻿<%@ Page Language="C#" MasterPageFile="~/Master.Master" AutoEventWireup="true" CodeBehind="PR_Appraisal.aspx.cs" Inherits="KPIS.GERP.GHRMS.APP.App_UI.Forms.PR_Appraisal" %>

<%@ Register src="../Controls/EmployeeTypeCombo.ascx" tagname="EmployeeTypeCombo" tagprefix="uc1" %>
<%@ Register src="../Controls/JobSiteCombo.ascx" tagname="JobSiteCombo" tagprefix="uc2" %>
<%@ Register src="../Controls/MasterYear.ascx" tagname="MasterYear" tagprefix="uc3" %>

<%@ Register src="../Controls/user.ascx" tagname="user" tagprefix="uc4" %>

<asp:Content ID="Content1" runat="server" contentplaceholderid="ContentPlaceHolder1">  
<script type="text/javascript">   

          function isNumberKey(event)  // ตัวเลขอย่างเดียว
          {
             var charCode = (event.which) ? event.which : event.keyCode
             if(charCode > 31 && (charCode < 48 || charCode > 57)){
//                 alert("กรอกได้แต่ตัวเลขครับ!")
                 return false;
	          }
             return true;
          }
         
            function openProjectDetails(id)
            {
                radopen("PR_SalaryDetail.aspx?id=" + id , "ProjectDtls");
                 return false;

                //maximunWindow();
            }
</script>

<telerik:RadCodeBlock ID="RadCodeBlock2" runat="server">        
            <script type="text/javascript">

                function onTextChange(sender) {
                    if (sender.get_value() == "") {
                        sender.set_text("");
                    }
                }
            </script>
    </telerik:RadCodeBlock>
      
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid2">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid2" 
                        LoadingPanelID="RadAjaxLoadingPanel2" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>

       <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel2" runat="server">
    </telerik:RadAjaxLoadingPanel>
    
    
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
<Windows>
    <telerik:RadWindow 
        id="ProjectDtls" 
        runat="server"
        showcontentduringload="false"
        VisibleStatusbar="false"
        title="รายการโยกย้าย"
        width="1100px"
        Height="600px"        
        Modal="true"
        behaviors="Close">
    </telerik:RadWindow>
</Windows>

        <Windows>
            <telerik:RadWindow 
                ID="RadWindow1"  
                DestroyOnClose = "true"               
                Modal ="true"                
                VisibleStatusbar ="false"
                runat="server">
            </telerik:RadWindow>
        </Windows>


</telerik:RadWindowManager>
    
    <title>ผลการประเมินการปฏิบัติราชการ</title>
    <link href="../../Styles/CssClass.css" rel="stylesheet" type="text/css" /> 
    
      <asp:panel ID="Panel6" runat="server" >
    <table width="1000" cellpadding="0" cellspacing="0">
        <tr>
            <td width="280" valign = "top">
                
                <uc4:user ID="user1" runat="server" />
                
            </td>
            
            <td width="20" ></td>
            
            <td>            
            <div class="moduleDivSlim700">
                    <div class="moduleDivBottom700">
                         <asp:Panel ID="PanelFilter" runat="server" Width="700px" ScrollBars="Auto">
                            <table align = "center" width = "650px">
                                    <tr>
                                        <td align="left" >
                                            กรม : <asp:Label ID="lblDepName" runat="server" Text="lblDepName"></asp:Label>
                                        </td>
                                        <td align="right"> สำนัก/กอง :</td>
                                        <td align="left">
                                            <uc2:JobSiteCombo ID="JobSiteCombo" runat="server" />
                                        </td>
                                    </tr>
                                </table>
                        </asp:Panel>
                    </div>
                </div>
            
            
            </td>
            
          </tr>
          </table>
          
          <tr>
          <td>
   
          
          
          <table>
                  <tr>
                      <td>
                          <div class="moduleDivSlim1000">
                              <div class="moduleDivBottom1000">
                                  <asp:Panel ID="Panel22" runat="server" ScrollBars="Auto" Width="1000px">
                                      <table align="center" width="100%">
                                            <tr>
                                              <td align="right" style="width: 98px" >
                                                  ประเภทบุคลากร :</td>
                                              <td align = "left">                                                  
                                                  <telerik:RadComboBox ID="cbEmployeeType" runat="server" AutoPostBack="True" 
                                                      CausesValidation="false" DataTextField="Name" DataValueField="Sequence" 
                                                      EmptyMessage="... ประเภทบุคลากร..." Filter="Contains" 
                                                      OnClientTextChange="onTextChange" 
                                                      onselectedindexchanged="cbEmployeeType_SelectedIndexChanged" Width="200px" 
                                                      style="margin-left: 0px">
                                                  </telerik:RadComboBox>                                                  
                                                </td>
                                              <td align = "right" style="width: 81px">
                                                  <asp:Label ID="lblTypeYear" runat="server" Text="lblTypeYear"></asp:Label>
                                                </td>
                                              <td align = "left">
                                                  <telerik:RadComboBox ID="cbYear" runat="server" AllowCustomText="true" 
                                                      AutoPostBack="True" CausesValidation="false" DataTextField="Name" 
                                                      DataValueField="Name" EmptyMessage="...เลือกปี ..." Filter="Contains" 
                                                      OnClientTextChange="onTextChange" 
                                                      onselectedindexchanged="cbYear_SelectedIndexChanged" Width="100px">
                                                  </telerik:RadComboBox>
                                                </td>
                                                <td align = "right" style="width: 91px"> รอบการประเมิน :</td>
                                                <td align = "left">
                                                    <asp:RadioButtonList ID="radPeriod" runat="server" RepeatDirection="Horizontal">
                                                      <asp:ListItem Selected="True" Value="1">ครั้งที่ 1</asp:ListItem>
                                                      <asp:ListItem Value="2">ครั้งที่ 2</asp:ListItem>
                                                    </asp:RadioButtonList>
                                                </td>
                                          </tr>                                        
                                          <tr>
                                              <td align="right" style="width: 98px">
                                                  &nbsp;</td>
                                              <td style="width: 212px">
                                         
                                                  <asp:Button ID="cmdSearch" runat="server" onclick="cmdSearch_Click" 
                                                      Text="ค้นหา" Width="104px" />
                                         
                                              </td>
                                              <td style="width: 81px">
                                                  &nbsp;</td>
                                              <td style="width: 107px">
                                                  &nbsp;</td>
                                              <td style="width: 91px">
                                                  &nbsp;</td>
                                                  <td>
                                                  &nbsp;</td>
                                          </tr>
                                      </table>
                                  </asp:Panel>
                              </div>
                          </div>
                      </td>
                  </tr>
              </table>
          
          
            
          
          </td>
          
          
          </tr>

          <tr>
          <td colspan = "3">
        <div class="moduleDivSlim1000">
        <div class="moduleDivBottom1000">
        <table align="center" width ="980px" >
        <tr>
            <td align="left" class="tableHeader">
             ผลการประเมินการปฏิบัติราชการ</td>
        </tr>
        </table>
        <table align="center" width ="980px" >
        <tr>
        <td >
        <asp:Panel ID="PanelGrid" 
            runat="server" 
            Width="980px" 
            Height="350px" ScrollBars="Auto" >
                <telerik:RadGrid ID="RadGrid2" runat="server" 
                    AllowFilteringByColumn="True" 
                    AllowAutomaticDeletes="True"
                    AllowMultiRowEdit="True" 
                    AllowMultiRowSelection="True" AllowPaging="True" 
                    AllowSorting="True" 
                    AutoGenerateColumns="False" EnableAJAX="True" 
                    EnableAJAXLoadingTemplate="True" GridLines="None" 
                    OnItemCommand="RadGrid2_ItemCommand" Skin="Outlook" Width="99%" 
                    onitemdatabound="RadGrid2_ItemDataBound">
                    <MasterTableView 
                        AllowMultiColumnSorting="True" 
                        CellSpacing="-1" 
                        ClientDataKeyNames="apr_dtls_seq"
                        CommandItemDisplay="Top"
                        DataKeyNames="apr_dtls_seq" 
                        InsertItemPageIndexAction="ShowItemOnCurrentPage" 
                        NoMasterRecordsText="&lt; ไม่มีข้อมูล &gt;">
                        <CommandItemTemplate>
                            <table width="100%">
                                <tr>
                                    <td>
                                        <asp:LinkButton ID="cmdAddNew" runat="server" CausesValidation="False" 
                                            CommandName="InitInsert" 
                                            Visible="<%# !RadGrid2.MasterTableView.IsItemInserted && RadGrid2.EditIndexes.Count <= 0 %>"> <img alt="" src="../Images/Buttons/AddRecord.gif" 
                                            style="border: 0px; vertical-align: middle;" /> เพิ่มผลการประเมิน</asp:LinkButton>
                                    </td>
                                    <td align="right">
                                    </td>
                                </tr>
                            </table>
                        </CommandItemTemplate>
                        <RowIndicatorColumn>
                            <HeaderStyle Width="20px" />
                        </RowIndicatorColumn>
  
                        <ExpandCollapseColumn Visible="True">
                        </ExpandCollapseColumn>
                        <Columns>
                            <telerik:GridEditCommandColumn 
                                EditText = "คลิกเพื่อแก้ไขรายการ"
                                ButtonType="ImageButton">
                            <HeaderStyle HorizontalAlign="Center" Width="15px" />
                            <ItemStyle HorizontalAlign="Center" Width="15px" />
                                      
                            </telerik:GridEditCommandColumn>
 
                            <telerik:GridButtonColumn ButtonType="ImageButton" 
                                CommandName="Delete" 
                                ConfirmDialogType="RadWindow" ConfirmText="ลบข้อมูลที่เลือก?" 
                                Text="คลิกเพื่อลบข้อมูล" 
                                UniqueName="column1">
                                <HeaderStyle HorizontalAlign="Center" Width="10px" />
                                <ItemStyle HorizontalAlign="Center" Width="10px" />
                            </telerik:GridButtonColumn>

                            <telerik:GridTemplateColumn                            
                                DataField="emp_text"
                                HeaderText="ชื่อผู้รับการประเมิน" 
                                ShowFilterIcon="false"
                                FilterControlWidth="100%"
                                CurrentFilterFunction="Contains"
                                AutoPostBackOnFilter="true"
                                HeaderStyle-HorizontalAlign = "Center"
                                UniqueName="emp_text">
                               <ItemTemplate>
                                    <%# Eval("emp_text")%>                        
                               </ItemTemplate>
                                <HeaderStyle Wrap="False" HorizontalAlign="Center" />
                         </telerik:GridTemplateColumn>
                         
                         <telerik:GridTemplateColumn
                            DataField="pos_name" 
                            HeaderText="ตำแหน่ง" 
                            ShowFilterIcon="false"
                            FilterControlWidth="100%"
                            CurrentFilterFunction="Contains"
                            AutoPostBackOnFilter="true"
                            HeaderStyle-HorizontalAlign = "Center"
                            UniqueName="PosName" >
                            <ItemTemplate>
                                <%# Eval("pos_name")%>                        
                            </ItemTemplate>
                            <ItemStyle Width="30%" />   
                        </telerik:GridTemplateColumn>
                            
                        <telerik:GridTemplateColumn
                            DataField="class_name"
                             HeaderText="ระดับ" 
                               ShowFilterIcon="false"
                               FilterControlWidth="100%"
                               CurrentFilterFunction="Contains"
                               AutoPostBackOnFilter="true"
                               HeaderStyle-HorizontalAlign = "Center"
                                UniqueName="ClassName">
                                   <ItemTemplate>
                                    <%# Eval("class_name")%>                        
                                   </ItemTemplate>
                           </telerik:GridTemplateColumn>
                           <telerik:GridTemplateColumn                            
                                DataField="job_site_name"                             
                                HeaderText="สังกัดการประเมิน" 
                                ShowFilterIcon="false"
                                FilterControlWidth="100%"
                                CurrentFilterFunction="Contains"
                                AutoPostBackOnFilter="true"
                                HeaderStyle-HorizontalAlign = "Center"
                                UniqueName="JobSiteName">                            
                               <ItemTemplate>
                                <%# Eval("apr_job_site_name")%>                        
                               </ItemTemplate>
                                             
                           </telerik:GridTemplateColumn>
                           <telerik:GridTemplateColumn                            
                                DataField="prm_job_site_name"                             
                                HeaderText="สังกัดการเลื่อนเงินเดือน" 
                                ShowFilterIcon="false"
                                FilterControlWidth="100%"
                                CurrentFilterFunction="Contains"
                                AutoPostBackOnFilter="true"
                                HeaderStyle-HorizontalAlign = "Center"
                                UniqueName="prm_job_site_name">                            
                               <ItemTemplate>
                                <%# Eval("prm_job_site_name")%>                        
                               </ItemTemplate>                                             
                           </telerik:GridTemplateColumn>
                           <telerik:GridTemplateColumn                            
                                DataField="appraisal"                             
                                HeaderText="ผลการพิจารณา" 
                                ShowFilterIcon="false"
                                FilterControlWidth="100%"
                                CurrentFilterFunction="Contains"
                                AutoPostBackOnFilter="true"
                                HeaderStyle-HorizontalAlign = "Center"
                                ItemStyle-HorizontalAlign = "Center"
                                UniqueName="Appraisal">                            
                               <ItemTemplate>
                                    <%# Eval("promote_name")%>                        
                               </ItemTemplate>
                                             
                           </telerik:GridTemplateColumn>
                           <telerik:GridTemplateColumn                            
                                DataField="score"                             
                                HeaderText="คะแนน" 
                                ShowFilterIcon="false"
                                FilterControlWidth="100%"
                                CurrentFilterFunction="Contains"
                                AutoPostBackOnFilter="true"
                                HeaderStyle-HorizontalAlign = "Center"
                                ItemStyle-HorizontalAlign = "Center"
                                UniqueName="score">                                
                               <ItemTemplate>
                                    <%# Eval("score", "{0:N2}")%>                         
                               </ItemTemplate>                                             
                           </telerik:GridTemplateColumn>                      
                        </Columns>
 
                        <EditFormSettings EditFormType="WebUserControl" 
                            UserControlName="../UserControls/PR_Appraisal.ascx">
                            <EditColumn UniqueName="EditCommandColumn1">
                            </EditColumn>
                        </EditFormSettings>
                        <PagerStyle Mode="NextPrevNumericAndAdvanced" />
                    </MasterTableView>
                    <ClientSettings AllowColumnHide="True" AllowColumnsReorder="True" 
                        EnableRowHoverStyle="True" ReorderColumnsOnClient="True">
                        <Selecting AllowRowSelect="True" EnableDragToSelectRows="true" />
                    </ClientSettings>
                </telerik:RadGrid>
            </asp:Panel>
                </td>
                </tr>
                </table>
                </div>
</div>
</td>
</tr>
</table>
</asp:panel>

</asp:Content>
